#pragma once
#include "Particle.h"
#include <list>
#include "Tools/Singleton.h"
 namespace LTGame
 {

	 enum ParticleOwnerType{
		 PARTICLE_OWNER_HERO,
		 PARTICLE_OWNER_ENEMY,
		 PARTICLE_OWNER_ALL
	 };

	class CParticleList
		: public Singleton<CParticleList>
	{
	public:
		CParticleList();
		~CParticleList();
		void creat(XOBJ* obj , short particle_id);
		void clearList(ParticleOwnerType type);
		void Logic(void);
		void Paint(void);
		void clearParticle(Particle *p);
		XOBJ* closeToHero(Particle *p);
	private:
		std::list<Particle*> m_heroBullet;
		std::list<Particle*> m_enemyBullet;
		void clearParticleList(list<Particle*>& plist);
		void logicParticleList(list<Particle*>& plist);
		void paintParticleList(list<Particle*>& plist);
	};

 }